﻿@using MvcPaging
@model MvcPaging.IPagedList<TuanAnhPersonalWeb.Models.ImageModel>




<p>
    @Html.ActionLink("Create New", "Create")
</p>

<p>@Html.ActionLink("Album Manager","Index","Album")</p>
<table>
    <tr>
        <th>
            ĐƯỜNG DẪN GỐC
        </th>
        <th>
            ĐƯỜNG DẪN HÌNH THU NHỎ
        </th>
        <th>
            CHÚ THÍCH ẢNH
        </th>
        <th> ALBUM</th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.IMAGE_DIR)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IMAGE_THUMB)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IMAGE_DESCRIPTION)
        </td>
        <td>@Html.DisplayFor(modelItem=>item.ALBUM_NAME)</td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.IMAGE_ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.IMAGE_ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.IMAGE_ID })
        </td>
    </tr>
}

</table>
<div class="pager">
  @Ajax.Pager(ViewData.Model.PageSize, ViewData.Model.PageNumber, ViewData.Model.TotalItemCount, new { controller = "Image", action = "Search", keySearch = ViewData["keySearch"], valSearch = ViewData["valSearch"], ALBUM_ID = ViewData["AlbumId"] }, new AjaxOptions { UpdateTargetId = "divGrid", OnBegin = "beginPaging", OnSuccess = "successPaging" })
 </div>